package ro.gateway.aida.charts;

import java.util.Timer;
import java.util.TimerTask;

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: Jun 17, 2004
 * Time: 6:17:58 PM
 * To change this template use File | Settings | File Templates.
 */
public class Tester {

//	public static void main(String[] args) {
//		try {
//			Class cl = Class.forName("ro.gateway.aida.search.ResultsFormat");
//			Field[] fields = cl.getDeclaredFields();
//			for (int i = 0; i < fields.length; i++) {
//				Field field = fields[i];
//				System.out.println("field[" + i + "]=" + field.getName());
//			}
//		} catch (ClassNotFoundException e) {
//			e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
//		}
//	}

//	public static void main(String[] args) {
//		DefaultCategoryDataset cds = new DefaultCategoryDataset();
//		cds.addValue(100, "wb", "2001");
//		cds.addValue(200, "wb", "2002");
//		cds.addValue(150, "wb", "2003");
//		cds.addValue(500, "ob", "2001");
//		cds.addValue(300, "ob", "2002");
//		cds.addValue(250, "ob", "2003");
//		cds.addValue(800, "qb", "2001");
//		cds.addValue(100, "qb", "2002");
//		cds.addValue(150, "qb", "2003");
//
//		BarRenderer3D renderer = new BarRenderer3D();
//		renderer.setLabelGenerator(new StandardCategoryItemLabelGenerator());
////		renderer.setItemLabelsVisible(true);
////		renderer.setSeriesItemLabelsVisible(0, true);
//		CategoryPlot plot = new CategoryPlot(cds, new CategoryAxis("banca"),
//			  new NumberAxis("value"), renderer);
//		JFreeChart chart = new JFreeChart(plot);
//		chart.setLegend(new StandardLegend());
//		chart.setBackgroundPaint(java.awt.Color.white);
//		try {
//			ChartUtilities.saveChartAsPNG(new File("c:\\p.png"), chart, 1000, 600);
//		} catch (IOException e) {
//			e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
//		}
//	}

	public static void main(String[] args) {
		TimerTask task = new TimerTask() {
			public void run() {
				System.out.println("cucu");
				System.out.flush();
			}
		};
		Timer timer = new Timer(false);
		timer.scheduleAtFixedRate(task, 1000, 1000);
		System.out.println("x");
		try {
			Thread.sleep(3*1000);
		} catch (InterruptedException e) {
			e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
		}
		System.out.println("y");
		timer.cancel();
	}
}
